﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<TimeTableManagement.Entities.Tb_News>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" 
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

<% using (Html.BeginForm()) { %>

    <table class="ui-accordion">
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.title) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.title) %>
                    <%: Html.ValidationMessageFor(model => model.title) %>
                </div>
            </td>
            <td>
                
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.startdate) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(Model => Model.startdate)%>
                    <%: Html.ValidationMessageFor(model => model.startdate)%>
                    <script type="text/javascript">
                        $("#startdate").addClass('tcal');
                    </script>
                    
                </div>
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.enddate) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.enddate)%>
                    <%: Html.ValidationMessageFor(model => model.enddate) %>
                    <script type="text/javascript">
                        $("#enddate").addClass('tcal');
                    </script>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.urlimage) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.urlimage) %>
                    <%: Html.ValidationMessageFor(model => model.urlimage) %>
                </div>    
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.option) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.option) %>
                    <%: Html.ValidationMessageFor(model => model.option) %>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.status) %>
                </div>
                <div class="editor-field">
                    <%: Html.EditorFor(model => model.status) %>
                    <%: Html.ValidationMessageFor(model => model.status) %>
                </div>   
            </td>
            <td>
                <div class="editor-label">
                    <%: Html.LabelFor(model => model.type, "Tb_Config") %>
                </div>
                <div class="editor-field">
                    <%: Html.DropDownList("type", String.Empty) %>
                    <%: Html.ValidationMessageFor(model => model.type) %>
                </div>
            </td>
        </tr>
    </table>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.content) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.content) %>
            <%: Html.ValidationMessageFor(model => model.content) %>
        </div>
        <p><input type="submit" value="Save" /></p>
<% } %>


<div>
    <%: Html.ActionLink("Back to List", "Index") %>
</div>
</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script src="../../Scripts/tcal.js" type="text/javascript"></script>
<link rel="Stylesheet" type="text/css" href="../../Content/tcal.css" />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
